<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobileshoppingcart/mobileSubmitOrder.css(css=${css})}"/>
			<script th:inline="javascript">
				var $buynow = [[${buynow}]];
				var _isbackUrl = [[${param.backUrl == null ? '' : param.backUrl[0]}]];
			</script>
		</th:block>
	</head>
	<body>
		<div class="weui-tab">
			<div class="weui-tab__bd">
			    <div class="weui-tab-title-shopping"><i class="fa fa-angle-left" onclick="commonClick.goBackShoppingCart();"></i><h1>确认订单</h1></div>
			    <div class="weui-jd-qrdd-bigbox">
			    	<div class="weui-jd-qrdd-a1" onclick="submitOrder.clickAddress();">
			    		<span class="weui-qrdd-a1-t1" id="receiver"></span>
			    		<span class="weui-qrdd-a1-t1" id="mobilephone"></span>
			    		<span class="weui-qrdd-a1-t2">默认</span>
			    		<div class="weui-qrdd-a1-b1">
			    			<i class="fa fa-map-marker"></i>
			    			<span class="weui-qrdd-a1-t3" id="areas"></span>
			    		</div>
			    		<span class="weui-qrdd-a1-t4" id="detailaddress"></span>
			    	</div>
			    	<div class="weui-zjzz-buylist-goods1">
			    		
				    		<div class="weui-tab-buylist">
				    			<th:block th:each="merchant, i : ${settleOrder.merchantObj}">
					    			<div class="weui-tab-buylist-gtime">
							      		<div class="weui-tab-buylist-gtime1"><h1><img th:src="@{{image}/mobile/member/pay-pic.png(image=${image})}"/><span th:text="${merchant.merchantname}"></span></h1></div>
						      		</div>
						      		<th:block th:each="good, k : ${settleOrder.goodSaleList}">
						      			<th:block th:if="${good.merchantid} eq ${merchant.entityid}">
						      				<div class="weui-cell__bd weui-tab-buylist-det">
						      					<div class="weui-cell">
									      			<div class="weui-cell__hd"><img th:src="${good.photopath}"/></div>
									      			<div class="weui-cell__bd weui-tab-buylist-gdetail">
									      				<p class="weui-tab-buylist-gtit1" th:text="${good.goodname}"></p>
									      				<p class="weui-tab-buylist-gm2">
									      					<em th:text="${good.specdefine} + '/' + ${good.meterunit}"></em>
									      					<th:block th:if="${good.salestate eq 1}">
									      						<em>【停售】</em>
									      					</th:block>
									      					<th:block th:if="${good.salestate eq 4 && good.goodstock eq 0}">
									      						<em>【无货】</em>
									      					</th:block>
									      					<th:block th:if="${good.salestate eq 4 && good.goodstock gt 0}">
									      						<em th:text="${good.goodstock} le 10 ? '【仅剩' + ${good.goodstock} + ${good.specdefine} + '】' : '有货'"></em>
									      					</th:block>
									      				</p>
									      				<p class="weui-tab-buylist-gm1">￥<span th:text="${good.goodprice}" th:id="'goodprice_' + ${i.count} + ${k.count}"></span></p>
									      			</div>
							      					<div class="weui-cell__ft">
										              <div class="weui-count">
										                <a class="weui-count__btn weui-count__decrease"></a>
										                <input class="weui-count__number" type="number" th:id="'goodnumber_' + ${i.count} + ${k.count}" th:value="${good.goodnumber}"/>
										                <input type="hidden" th:id="'shoppingcartid_' + ${i.count} + ${k.count}" th:value="${good.shoppingcartid}"/> <!-- 购物车id -->
										                <input type="hidden" th:id="'saleid_' + ${i.count} + ${k.count}" th:value="${good.saleid}" th:mid="'mid_' + ${i.count}"/> <!-- 商品销售id -->
										                <a class="weui-count__btn weui-count__increase"></a>
										              </div>
										            </div>
									            </div>
								      		</div>
						      			</th:block>
						      		</th:block>
						      		<div class="weui-gei_shangj_ly">
							    		<h1>备注信息：</h1>
							    		<input type="text" leave="leave" th:id="'leave_' + ${i.count}" placeholder="请您留言" />
							    		<input type="hidden" mid="mid" th:id="'merchantid_' + ${i.count}" th:value="${merchant.entityid}"/>
						    		</div>
				    			</th:block>
					      		<div class="weui-tab-buylist-goodsm">
					      			<i class="weui-tab-buylist-gm3">共<span id="goodNum" th:text="${settleOrder.totalGood}"></span>件</i>
					      			<i>商品金额：<i class="weui-tab-buylist-gm4">￥<span id="goodTotalPrice" th:text="${settleOrder.totalPrice}"></span></i></i>
					      		</div>
					      	</div>
				      	
			    	</div>
			    	<div class="weui-peis-xz">
			    		<div class="weui-kuaid" autoClose="false"><p>配送方式</p><span onclick="commonClick.popupDeliveryMode();"><em id="deliverymode">自提</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="deliverymode_val" value="dm1"/></div>
			    		<div class="weui-kuaid"><p>配送时间</p><span onclick="commonClick.popupDeliveryTime();"><em id="deliverytime">标准时间: 标准到达</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="deliverytime_val" value="standard_标准到达"/><input type="hidden" id="deliverytime_id" value="standard_1"/></div>
			    		<!-- <div class="weui-kuaid"><p>发票信息</p><span onclick="commonClick.popupInvoiceMode();"><em id="invoices">请选择</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="invoices_val" /></div> -->
			    		<!-- <div class="weui-kuaid" style="border-bottom:none;"><p>支付方式</p><span onclick="commonClick.popupPaymentMode();"><em id="paymentmode">微信</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="paymentmode_val" value="pm1"/></div> -->
			    	</div>
			    	<div class="weui-favourable">
			    		<div class="weui-youhui" onclick="submitOrder.clickDiamond();"><i class="fa fa-money"></i><span>可用<em style="font-style: inherit; font-weight: bold;color:coral;" th:text="${settleOrder.diamondTotal}" id="diamond_val"></em>颗钻石抵用<em style="font-style: inherit; font-weight: bold; color:coral;" th:text="${settleOrder.diamondAvailable}"></em>元</span><i class="weui-icon-circle" id="diamond"></i></div>
			    		<!-- <div class="weui-youhui" onclick="submitOrder.clickIntegral();"><i class="fa fa-diamond"></i><span>可用10积分抵用0.01元</span><i class="weui-icon-circle" id="integral"></i></div> -->
			    	</div>
			    </div>
			    <div class="weui-dib_daoh_b">
			    	<div class="weui-zhou"><p>总计：<em  id="total" th:text="${settleOrder.totalPrice}"></em></p></div>
			    	<div class="weui-you">
			    		<div class="weui-grou" onclick="submitOrder.saveOrder();">提交订单</div>
			    	</div>
			    </div>
		    </div>
	    </div>
       
       <iframe id="addressMgr" class="popup-address-list-iframe"></iframe>
      
      <!-- 弹出配送方式start -->
      <div id="popup-deliverymode" class="weui-screening-categoriess">
			<div class="weui-sc-contentss">
	        <div class="toolbar">
	          <div class="toolbar-inner">
	            <a href="javascript:commonClick.clickDeliverymode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-deliverymode');"></i> --></a>
	            <h1 class="title">配送方式</h1>
	          </div>
	        </div>
	        <div class="weui-cells weui-cells_radio">
		      <label class="weui-cell weui-check__label" for="dm1">
		        <div class="weui-cell__bd">
		          <p>自提</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" class="weui-check" name="radio1" id="dm1" dm="dm">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="dm2">
		        <div class="weui-cell__bd">
		          <p>市场配送</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="dm2" dm="dm">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <!-- <a href="javascript:commonClick.clickDeliverymode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
		    </div>
	      </div>
       </div>
       <!-- 弹出配送方式end -->
       
       <!-- 弹出配送时间start -->
      <div id="popup-deliverytime" class="weui-screening-categoriess">
			<div class="weui-sc-contentss">
		        <div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:commonClick.clickDeliveryTime();" class="picker-button close-popup" >完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-deliverytime');"></i> --></a>
		            <h1 class="title">配送时间</h1>
		          </div>
		        </div>
		        <div class="weui-tab">
				  <div class="weui-navbar">
				  	<th:block th:each="days, i : ${settleOrder.dayNumList}">
				  		<th:block th:if="${i.count} eq 1">
				  			<a class="weui-navbar__item  weui-bar__item--on" th:href="'#' + ${days.did}" th:text="${days.dayType}" th:id="'pid_'+${days.did}"></a>
				  		</th:block>
				  		<th:block th:if="${i.count} ne 1">
				  			<a class="weui-navbar__item" th:href="'#' + ${days.did}" th:text="${days.dayType}" th:id="'pid_'+${days.did}"></a>
				  		</th:block>
				  	</th:block>
				  </div>
				  <div class="weui-tab__bd weui-tab-time">
				  	<th:block th:each="days, i : ${settleOrder.dayNumList}">
		  				<th:block th:if="${i.count} eq 1">
		  					<div th:id="${days.did}" class="weui-tab__bd-item weui-tab__bd-item--active">
			  					<div class="weui-cells weui-cells_radio">
			  						<th:block th:each="times, k : ${settleOrder.timeIntervalList}">
					  					<th:block th:if="${days.did} eq ${times.pid}">
					  						<label class="weui-cell weui-check__label" th:for="${times.pid} +'_'+ ${k.count}">
									        	<div class="weui-cell__bd">
									          		<p th:text="${times.timeInterval}" th:id="'p-'+${times.pid} +'_'+ ${k.count}"></p>
									        	</div>
									        	<div class="weui-cell__ft">
									          		<input type="radio" class="weui-check" name="radio1" th:id="${times.pid} +'_'+ ${k.count}" dt="dt">
									          		<span class="weui-icon-checked"></span>
									        	</div>
									     	</label>
					  					</th:block>
			  						</th:block>
							    </div>
						    </div>
		  				</th:block>
		  				<th:block th:if="${i.count} ne 1">
		  					<div th:id="${days.did}" class="weui-tab__bd-item">
		  						<div class="weui-cells weui-cells_radio">
							        <th:block th:each="times, k : ${settleOrder.timeIntervalList}">
					  					<th:block th:if="${days.did} eq ${times.pid}">
									      <label class="weui-cell weui-check__label" th:for="${times.pid} +'_' + ${k.count}">
									        <div class="weui-cell__bd">
									          <p th:text="${times.timeInterval}" th:id="'p-'+${times.pid} +'_'+ ${k.count}"></p>
									        </div>
									        <div class="weui-cell__ft">
									          <input type="radio" class="weui-check" name="radio1" th:id="${times.pid} +'_'+ ${k.count}" dt="dt">
									          <span class="weui-icon-checked"></span>
									        </div>
									      </label>
									      </th:block>
							       </th:block>
							    </div>
						    </div>
		  				</th:block>
				  	</th:block>
				  </div>
				<!-- <a href="javascript:commonClick.clickDeliverymode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
				</div>
	      </div>
       </div>
       <!-- 弹出配送时间end -->
       
       <!-- 弹出支付方式start -->
       <div id="popup-paymentmode" class="weui-screening-categoriess">
			<div class="weui-sc-contentss">
				<div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:commonClick.clickPaymentmode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-paymentmode');"></i> --></a>
		            <h1 class="title">支付方式</h1>
		          </div>
		        </div>
		        <div class="weui-cells weui-cells_radio">
			      <label class="weui-cell weui-check__label" for="pm1">
			        <div class="weui-cell__bd">
			          <p>微信</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" class="weui-check" name="radio1" id="pm1" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="pm2">
			        <div class="weui-cell__bd">
			          <p>支付宝</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="pm2" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="pm3">
			        <div class="weui-cell__bd">
			          <p>银联</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="pm3" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <!-- <a href="javascript:commonClick.clickPaymentmode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
			    </div>
			</div>
	   </div>
	   <!-- 弹出支付方式end -->
	 	
	   <!-- 弹出配送方式start -->
       <div id="popup-invoicemode" class="weui-screening-categoriess">
	      <div class="weui-sc-contentss">
		      <div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:commonClick.clickInvoicemode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-invoicemode');"></i> --></a>
		            <h1 class="title">发票信息</h1>
		          </div>
		        </div>
		        <div class="weui-cells weui-cells_radio">
			      <label class="weui-cell weui-check__label" for="x16">
			        <div class="weui-cell__bd">
			          <p>电子发票</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" class="weui-check" name="radio1" id="x16" invoices="invoices">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="x17">
			        <div class="weui-cell__bd">
			          <p>普通发票</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="x17" checked="checked" invoices="invoices">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <!-- <a href="javascript:commonClick.clickInvoicemode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
			    </div>
	      </div>
       </div>
       <!-- 弹出配送方式end -->
	 <script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/mobileSubmitOrderHandler.js(js=${js})}"></script> 
    </body>
</html>